package com.example.contract.mapper;

import com.example.contract.model.results.SendNftResults;
import org.apache.ibatis.annotations.*;
import org.web3j.abi.datatypes.Int;

import java.util.List;

@Mapper
public interface SendNftAddMapper {


    @Select("select root_address as rootAddress,short_address as shortAddress,nft_num as nftNum from tb_ztc_short_adr where nft_num<1")
   List<SendNftResults> getAllByNft();

    @Update("update tb_ztc_short_adr set nft_num=#{nft_num} where short_address=#{short_address}")
    void updateNftNum(@Param("shortAddress") String shortAddress, @Param("nftNum") Integer nftNum);

    @Select("select img_url from tb_ztc_nft ")
    List<String> findImageAll();


    @Insert("insert into tb_ztc_nft (img_url,is_send)values(#{img},0)")
    void insertNft(@Param("img") String img);

}
